#ifndef TRANS_H_
#define TRANS_H_

/*--------------------------------------------------------------------------*/

#define TRANS_FIFO	1
#define TRANS_MSG	2
#define TRANS_TCP	3
#define TRANS_SHM 4

/*--------------------------------------------------------------------------*/

typedef struct transCDT * transADT;

typedef struct Ttcp
{
	char *host;
	char *port;	
}Ttcp;

typedef struct Tshm
{
	int keySnd;
	int keyRcv;	
}Tshm;

typedef struct Tfifo
{
	char *read;
	char *write;
}Tfifo;

/*--------------------------------------------------------------------------*/

int connTrans(int type, const void *dest, transADT *trans);

int bindTrans(int type, const void *dest, transADT *trans);

int acceptTrans(transADT trans, transADT *new);

int rcvTrans(transADT trans, void *buf, int count, int timeO);

int sndTrans(transADT trans, void *buf, int count);

int closeTrans(transADT trans);

/*--------------------------------------------------------------------------*/

#endif /*TRANS_H_*/
